<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>이미지 첨부</title>
<style>
	body {margin:0; padding:0;}
	ul {list-style:none; margin:0; padding:0; margin:10px 10px;}
	div {margin-top:20px;}
</style>
<script type="text/javascript">
	function f_del_file(){
		var lo_ul = document.getElementById("ul_attach");
		var lo_li = lo_ul.getElementsByTagName("li");
		var lo_li_index = lo_li.length - 1;

		if(lo_li_index >= 1){
			lo_ul.removeChild(lo_li[lo_li_index]);
		}

		return false;
	}

	function f_add_file(){
		var lo_ul = document.getElementById("ul_attach");
		
		lo_row = document.createElement("li");
		lo_ul.appendChild(lo_row);

		lo_row.innerHTML = "<input type='file' name='files' />";

		return false;

	}

	function send(){
		frm = document.fileform;
		frm.submit();
	}
</script>
</head>
<body>

<form  method="post" name="fileform" action="img_process2.asp"  enctype="multipart/form-data">
	<ul id="ul_attach">
		<li><input type="file" name="files" /></li>
	</ul>
	<a href="#" onclick="return f_add_file()">+</a> <a href="#" onclick="return f_del_file()">-</a>
	<div><a href="#" onclick="send()">등록하기</a></div>
</form>

</body>
</html>